package com.moli.iov.base.model.dto.req;

import com.moli.iov.base.model.UserDto;
import com.moli.iov.base.model.dto.res.VehicleFenceGpsResDto;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * @author whl
 */
@Data
public class VehicleFenceReqDto extends UserDto {

  /**
   * 查询参数（0：车牌号，1：vin 2, 围栏名称 3 围栏区域）
   */
  private Integer queryParam;
  /**
   * 查询值
   */
  private String queryValue;


  @NotNull(message = "围栏Id不能为空", groups = {Update.class, Read.class,
      Delete.class,Redraw.class})
  private Long id;
  /**
   * 围栏名称
   */
  @NotBlank(message = "请输入围栏名称", groups = {Save.class,
      Update.class})
  @Length(min = 5, message = "围栏名称应至少5个字符", groups = {Save.class,
      Update.class})
  @Length(max = 20, message = "围栏名称输入字符上限为20个字符", groups = {Save.class,
      Update.class})
  private String fenceName;
  /**
   * 围栏区域
   */
  @NotBlank(message = "请输入围栏区域", groups = {Save.class,
      Update.class})
  @Length(min = 6, message = "围栏区域应至少6个字符", groups = {Save.class,
      Update.class})
  @Length(max = 30, message = "围栏区域输入字符上限为30个字符", groups = {Save.class,
      Update.class})
  private String fenceArea;
  /**
   * //围栏区域坐标（数据格式:[{"longitude": "116.46", "latitude": "39.92"}]）
   */
  @NotNull(message = "围栏地图坐标不能为空", groups = {Save.class,
     Redraw.class})
  private VehicleFenceGpsResDto fenceAreaCoordinate;
  /**
   * //围栏区域坐标范围（数据格式:[{"longitude": "116.46", "latitude": "39.92" }, {"longitude": "116.46",
   * "latitude": "39.92" },{"longitude": "116.46", "latitude": "39.92" },{"longitude": "116.46",
   * "latitude": "39.92" }]）
   */
  @NotNull(message = "围栏地图坐标范围不能为空", groups = {Save.class,
      Redraw.class})
  private List<VehicleFenceGpsResDto> fenceAreaCoordinateRange;
  /**
   * CIRCLE(1, "圆"), SQUARE(2, "正方形"), POLYGON(3, "多边形");
   */
  @NotNull(message = "请输入围栏类型", groups = {Save.class,
     Redraw.class})
  private Integer fenceShape;
  /**
   * 报警类型(0:进围栏报警,1:出围栏报警)
   */
  @NotNull(message = "请输入报警类型", groups = {Save.class,
      Update.class})
  private Integer alarmType;

  /**
   * 所属公司
   */
  @NotNull(message = "公司Id不能为空", groups = {Save.class,
      Update.class})
  private Long companyId;
  /**
   * 公司名称
   */
  @NotBlank(message = "公司名称不能为空", groups = {Save.class,
      Update.class})
  private String companyName;
  /**
   * 半径（距离）米
   */
  private Double radius;


  /**
   * 创建人
   */
  private String createUser;

  /**
   * 创建时间
   */
  private Date gmtCreate;

  /**
   * 修改人
   */
  private String modifiedUser;

  /**
   * 修改时间
   */
  private Date gmtModified;

  /**
   * 删除标识
   */
  private Integer isDelete;


  public interface Save {

  }

  public interface Update {

  }

  /**
   * 只读
   */
  public interface Read {

  }

  /**
   * 删除
   */
  public interface Delete {

  }
  /**
   * 重绘
   */
  public interface Redraw {

  }
}
